package com.talos.service.codegen;

import java.util.HashMap;
import java.util.Map;

public class CodeGenerator {

    public static void main(String[] args) {
        //生成项目基础结构
        genProject();

        //生成项目代码
        //genCode();

    }

    private static void genProject(){
        CodegenEngine engine = new CodegenEngine();
        Map<String,Object> bindingMap = new HashMap<>();
        //项目名称
        bindingMap.put("projectName","talos-ums");
        //项目端口
        bindingMap.put("serverPort","7856");
        //项目子模块名称
        bindingMap.put("projectModulePackageName","ums");

        //项目子模块包名
        bindingMap.put("basePackage","com.talos.ums");

        //项目启动类名
        bindingMap.put("applicationClass","UmsServerApplication");

        engine.executeProject(bindingMap);
    }


    private static void genCode(){

        MysqlClassMaker maker = new MysqlClassMaker("172.16.110.26:3306",
                "yunbao_ums_test",
                "root",
                "yjyyotbtest@2024!");

        maker.generic("", "talos-ums", "ums", "com.talos");
    }
}
